﻿<ResourceDictionary  
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
    xmlns:local="clr-namespace:Microsoft.WVB.Framework.AdControls;assembly=Microsoft.WVB.Framework"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">

    <!-- AdBanner Style-->
    <Style TargetType="local:AdBanner">
        <Setter Property="BorderBrush" Value="#FF000000"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontFamily" Value="Verdana"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AdBanner">
                    <Grid Background="Transparent" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" >
                        <ContentControl x:Name="AdArea" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- AdImage Style-->
    <Style TargetType="local:AdImage">
        <Setter Property="BorderBrush" Value="#FF000000"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AdImage">
                    <Grid x:Name="MiniAdRoot" Background="Transparent">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Image Cursor="Hand" Grid.Column="0" Grid.ColumnSpan="2" Canvas.ZIndex="1" Stretch="Fill"  x:Name="MediaContent" />
                        <StackPanel Grid.Column="1" Canvas.ZIndex="10" VerticalAlignment="Top" HorizontalAlignment="Right" Orientation="Horizontal" Margin="5">
                            <Button Opacity="0.7" Margin="1" x:Name="CloseButton" Style="{StaticResource CloseButtonTemplate}" Height="15" Width="15" HorizontalAlignment="Right" VerticalAlignment="Top" />
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- AdOverlay Style-->
    <Style TargetType="local:AdOverlay">
        <Setter Property="BorderBrush" Value="#FF000000"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AdOverlay">
                        <Grid Background="Transparent" x:Name="Overlay">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0.33*"/>
                                <ColumnDefinition Width="0.33*"/>
                                <ColumnDefinition Width="0.33*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="0.33*"/>
                                <RowDefinition Height="0.33*"/>
                                <RowDefinition Height="0.33*"/>
                            </Grid.RowDefinitions>
                            <ContentControl Grid.Row="0" Grid.Column="0" Opacity=".9" x:Name="TopOverlayArea" Grid.ColumnSpan="3" VerticalAlignment="Top"/>
                            <ContentControl Grid.Row="2" Grid.Column="0" Opacity=".9" x:Name="BottomOverlayArea" Grid.ColumnSpan="3" VerticalAlignment="Bottom"/>
                            <ContentControl Grid.Row="0" Grid.Column="0" Grid.RowSpan="3" x:Name="BumperArea" Grid.ColumnSpan="3" />
                            <ContentControl x:Name="PipArea" Opacity=".9" Grid.ColumnSpan="1" Grid.RowSpan="1" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="6,6,0,0" />
                        </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- AdVideo Style-->
    <Style TargetType="local:AdVideo">
        <Setter Property="BorderThickness" Value="0,0,0,0"/>
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontFamily" Value="Verdana"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AdVideo">
                	<Border Height="Auto" Width="Auto" BorderThickness="1,1,1,1" BorderBrush="#FFFFFFFF">
                		<Grid Height="Auto" x:Name="MiniPlayerRoot" Width="Auto" Background="#FFFFFFFF">
                			<MediaElement Cursor="Hand" Stretch="Fill" x:Name="MediaContent" HorizontalAlignment="Stretch" Margin="1,1,1,1" VerticalAlignment="Stretch" d:LayoutOverrides="GridBox" />
                			<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="5,5,5,5" VerticalAlignment="Top" d:LayoutOverrides="Width, Height">
                				<ToggleButton Opacity="0.7" Margin="1" x:Name="MuteButton" Style="{StaticResource MuteButtonTemplate}" Height="15" Width="15" VerticalAlignment="Center" />
                				<Button Opacity="0.7" Margin="1" x:Name="CloseButton" Style="{StaticResource CloseButtonTemplate}" Height="15" Width="15" VerticalAlignment="Center" />
                			</StackPanel>
                		</Grid>
                	</Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    	<Setter Property="HorizontalAlignment" Value="Stretch"/>
    	<Setter Property="VerticalAlignment" Value="Stretch"/>
    	<Setter Property="HorizontalContentAlignment" Value="Left"/>
    	<Setter Property="VerticalContentAlignment" Value="Top"/>
    	<Setter Property="BorderBrush" Value="{x:Null}"/>
    	<Setter Property="Foreground" Value="{x:Null}"/>
    </Style>

    <!-- AdXap Style-->
    <Style TargetType="local:AdXap">
        <Setter Property="BorderBrush" Value="#FF000000"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontFamily" Value="Verdana"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AdXap">
                    <Grid x:Name="MiniAdRoot" Height="60" Width="640" Background="Transparent">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ContentControl Cursor="Hand" Grid.Column="0" Grid.ColumnSpan="2" Canvas.ZIndex="1" Height="60" Width="640" x:Name="MediaContent" />
                        <StackPanel Grid.Column="1" Canvas.ZIndex="10" VerticalAlignment="Top" HorizontalAlignment="Right" Orientation="Horizontal" Margin="1">
                            <Button Opacity="0.7" Margin="1" x:Name="CloseButton" Style="{StaticResource CloseButtonTemplate}" Height="15" Width="15" />
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>